home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group95b.txt
/
000081_icon-group-sender _Mon Jul 10 17:24:00 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-09-18
|
1KB
Received: by cheltenham.cs.arizona.edu; Mon, 10 Jul 1995 16:07:36 MST
Message-Id: <9507101724.AA28967@ns1.computek.net>
Mime-Version: 1.0
Content-Length: 703
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Date: Mon, 10 Jul 95 17:24 CDT
From: gep2@computek.net
Subject: DOS delay routine
To: icon-group@cs.arizona.edu
X-Mailer: SPRY Mail Version: 04.00.06.17
Errors-To: icon-group-errors@cs.arizona.edu
>...I needed something to wait about 5 min. between checkups do I wrote
a little delay route that waits in a little key sensing loop.
# provide a time delay to limited amount of collected data
#
procedure delay(n)
target := n * 250000 # approx 5 min intervals
every i:= 1 to target do
{
if kbhit() then
{
kee := getch()
if kee == "\e" then halt("ESCAPED!")
}
22.0000/7.0000000
}
end
I'm curious why you didn't use &time or &clock to do this kind of thing, rather
than just counting loop iterations or the like... if for no other reason than
making your routine processor-speed-insensitive!
Gordon Peterson
http://www.computek.net/public/gep2/